package com.buaa.aiguangxi.config;

import com.buaa.aiguangxi.dao.InstanceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduleConfig {
    @Autowired
    private InstanceDao instanceDao;
    @Scheduled(cron = "* */10 * * * * ")
    public void stopTraining(){
        instanceDao.stopTraining();
    }
}
